﻿#include "CmdSaveSurfaceElectricFieldMapMainSettingData.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdSaveSurfaceElectricFieldMapMainSettingData::CmdSaveSurfaceElectricFieldMapMainSettingData()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdSaveSurfaceElectricFieldMapMainSettingData::~CmdSaveSurfaceElectricFieldMapMainSettingData()
    {
    }

    bool CmdSaveSurfaceElectricFieldMapMainSettingData::execute()
    {
        emit IBaseSignalInstance->signal_saveSurfaceElectricFieldMapMainSettingData(m_windowId,
            m_type,
            m_settingDataId,
            m_scalarBarIsAutoRange,
            m_scalarBarMin,
            m_scalarBarMax,
            m_scalarBarIsShowTitle,
            m_scalarBarTitle,
            m_scalarBarFontColor,
            m_scalarBarFontSize,
            m_geometryTransparency,
            m_resultGraphName,
            m_resultGraphModelTransparency,
            m_cubeAxesIsVisible);
        return true;
    }

    void CmdSaveSurfaceElectricFieldMapMainSettingData::undo()
    {
    }

    void CmdSaveSurfaceElectricFieldMapMainSettingData::redo()
    {
        // execute();
    }

    void CmdSaveSurfaceElectricFieldMapMainSettingData::saveSurfaceElectricFieldMapMainSettingData(int windowId, int type, int settingDataId,
        bool scalarBarIsAutoRange, double scalarBarMin, double scalarBarMax, bool scalarBarIsShowTitle,
        QString scalarBarTitle, QString scalarBarFontColor, int scalarBarFontSize, int geometryTransparency, QString resultGraphName,
        int resultGraphModelTransparency, bool cubeAxesIsVisible)
    {
        m_windowId = windowId;
        m_type = type;
        m_settingDataId = settingDataId;
        m_scalarBarIsAutoRange = scalarBarIsAutoRange;
        m_scalarBarMin = scalarBarMin;
        m_scalarBarMax = scalarBarMax;
        m_scalarBarIsShowTitle = scalarBarIsShowTitle;
        m_scalarBarTitle = scalarBarTitle;
        m_scalarBarFontColor = scalarBarFontColor;
        m_scalarBarFontSize = scalarBarFontSize;
        m_geometryTransparency = geometryTransparency;
        m_resultGraphName = resultGraphName;
        m_resultGraphModelTransparency = resultGraphModelTransparency;
        m_cubeAxesIsVisible = cubeAxesIsVisible;
    }

} // namespace PostCommand
